<include file="public@header" />
</head>

<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a>项目</a></li>
            <li><a href="{:url('output',array())}">报表导出</a></li>
        </ul>
        <form method="post" class="js-ajax-form margin-top-20">
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th>项目名称</th>
                        <th>工程地址</th>
                        <th>投标单位</th>
                        <th>状态</th>

                        <th>{:lang('ACTIONS')}</th>
                    </tr>
                </thead>
                <tbody>
                    <foreach name="data" item="v">
                        <tr>
                            <td>{$v.name}</td>
                            <td>{$v.address}</td>
                            <td>{$v.Bidder}</td>
                            <td>
                                <?php if($v['status'] == 1){?>
                                <span class="label label-danger">施工中</span>
                                <?php }elseif($v['status'] == 2){?>
                                <span class="label label-warning">已验收</span>
                                <?php }elseif($v['status'] == 3){?>
                                <span class="label label-warning">交付使用</span>
                                <?php }elseif($v['status'] == 4){?>
                                <span class="label label-success">已决算</span>
                                <?php }elseif($v['status'] == 5){?>
                                <span class="label label-success">已结清尾款</span>
                                <?php }elseif($v['status'] == 6){?>
                                <span class="label label-default">已过保修</span>
                                <?php }?>
                            </td>


                            <td>
                                <?php if ($adminId == 1 || in_array($role, [1, 2, 3, 4])) { ?>
                                <a class="btn btn-xs btn-primary js-ajax-submit"
                                    href="{:url('see',array('id'=>$v['id']))}">查看详情</a>
                                <?php } ?>
                                <?php if ($adminId == 1 || in_array($role, [1, 2, 3, 4])) { ?>
                                <a class="btn btn-xs btn-primary js-ajax-submit"
                                    href="{:url('edit',array('id'=>$v['id']))}">编辑</a>
                                <?php } ?>
                                <?php if ($adminId == 1 || in_array($role, [1, 2, 3, 4])) { ?>
                                <a class="btn btn-xs btn-primary js-ajax-submit"
                                    href="{:url('manager',array('id'=>$v['id']))}">项目经理</a>
                                <?php } ?>
                                <?php if ($adminId == 1 || in_array($role, [1, 3, 4, 5])) { ?>
                                <a class="btn btn-xs btn-primary js-ajax-submit"
                                    href="{:url('Finance',array('id'=>$v['id']))}">财务</a>
                                <?php } ?>
                                <?php if ($adminId == 1 || in_array($role, [1, 3, 4, 6])) { ?>
                                <a class="btn btn-xs btn-primary js-ajax-submit"
                                    href="{:url('Const/index',array('id'=>$v['id']))}">施工员</a>
                                <?php } ?>
                                <a class="btn btn-xs btn-success js-ajax-submit"
                                    href="{:url('Files/index',array('id'=>$v['id']))}">共享文件</a>
                            </td>
                        </tr>
                    </foreach>
                </tbody>
            </table>

        </form>
    </div>
    <script src="__STATIC__/js/admin.js"></script>
</body>

</html>